
#import "UIFont_SH.h"

@implementation UIFont (SH)

/*
 typedef NS_ENUM(NSInteger, EPingFangType){
     eDefault,      // PingFang SC
     eThin,
     eRegular,
     eLight,
     eMedium,
     eSemibold,
     eUltralight,
 };
 */
+ (UIFont *)pfWithType:(EPingFangType)type size:(CGFloat)fontSize {
    switch (type) {
    case eThin:
        return [UIFont fontWithName:@"PingFangSC-Light" size:fontSize];
        
    case eRegular:
        return [UIFont fontWithName:@"PingFangSC-Regular" size:fontSize];
        
    case eLight:
        return [UIFont fontWithName:@"PingFangSC-Light" size:fontSize];
        
    case eMedium:
        return [UIFont fontWithName:@"PingFangSC-Medium" size:fontSize];
        
    case eSemibold:
        return [UIFont fontWithName:@"PingFangSC-Semibold" size:fontSize];
        
    case eUltralight:
        return [UIFont fontWithName:@"PingFangSC-Ultralight" size:fontSize];

    default:
        break;
    }
    
    return [UIFont fontWithName:@"PingFang SC" size:fontSize];
}
@end
